package cn.itsuorce.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class Product {
    private Long id;
    private String name;
    private String resources;
    private BigDecimal costprice;
    private BigDecimal saleprice;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")//SimpleDateFormat
    private Date offsaletime;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date onsaletime;
    //状态：0表示上架  -1表示下架
    private Integer state = -1;
    private Date createtime = new Date();

    //销量
    private Long salecount = 0L;
    //所属商家
    private Long shop_id;
    private Shop shop;

    //商品详情
    private ProductDetail detail;

}
